const path = require("path");

console.log(path.join("../a/b/c", "d/e", "../abc/efg"));
// c:\d\e\a  所有路径都是存的，模拟执行cd命令
/*
      cd c:/d
c:/d> cd ./e/f/g
c:/d/e/f/g> cd ../../a
c:/d/e/a>
*/
console.log(path.resolve("c:/d", "./e/f/g", "../../a"));
